package com.youlu.campus.admin.qa;
import com.youlu.campus.entity.UserQaInfo;
import com.youlu.campus.entity.VO.req.UserQaQueryVO;
import com.youlu.campus.service.qa.UserQaInfoService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserQaInfoController {
    @Autowired
    private UserQaInfoService userQaInfoService;

    @PostMapping("/user-qa/list")
    public QResult list(@RequestBody UserQaQueryVO request) {
        return QResult.success(userQaInfoService.list(request));
    }

    @PostMapping("/user-qa/update")
//    @RequestActivityAuth(activityId = "#request.activityQaInfoId", paramType = AuthParamTypeEnum.QA)
    public QResult update(@RequestBody UserQaInfo request) {
        return QResult.success(userQaInfoService.update(request));
    }
    @GetMapping("/user-qa/find-one")
    public QResult findOne(@RequestParam("id") String id) {
        return QResult.success(userQaInfoService.findOne(id));
    }


}
